<template>
  <van-form :label-align="options.labelAlign" :input-align="options.inputAlign">
  <!--配置分组的情况-->
    <template v-if="Array.isArray(options.groups)&&options.groups.length>0">
      <template v-for="(item,index) in options.groups">
        <van-cell-group :inset="!!options.inset" :border="!!options.border" :title="item.title">
          <template v-for="row in item.column">
            <FormMate v-bind="{...row,...row.props}" v-model:value="data[row.prop]"></FormMate>
          </template>
        </van-cell-group>
      </template>
    </template>
  </van-form>

</template>

<script  setup>
import FormMate from './form-meta.vue'
  const props=defineProps({
    data:{
      type:Object,
      default:()=>{}
    },
    options:{
      type:Object,
      default:()=>{}
    }
  })
</script>

<style scoped lang="scss">

</style>